# -*- coding: UTF-8 -*-

import sys

class stdClass(object):

    def __init__(self, success, message = '', data = None, errcode = None):
        self.success = success
        self.message = message
        self.data = data
        self.errcode = errcode


def outputobj(success, message = '', data = None, errcode = None):
    return stdClass(success, message, data, errcode)


def stdout(content, isExit = True):
    sys.stdout.flush()
    sys.stdout.write(content)
    sys.stdout.flush()
    if isExit:
        exit()
